package org.putrpctorest.parameter.impl;

public class Match {

	private Expressions expressions1;

	private Expressions expressions2;

	public static Match NO_MATCH = new Match();

	private Match() {

	}

	private Match(Expressions expressions1,
			Expressions expressions2) {
		this.expressions1 = expressions1;
		this.expressions2 = expressions2;
	}

	public static Match createMatch(Expressions expressions1,
			Expressions expressions2) {
		return new Match(expressions1, expressions2);
	}
	
	public Expressions getExpressions(String description) {
		if (expressions1.getDescription().equals(description)) {
			return expressions1;
		}
		if (expressions2.getDescription().equals(description)) {
			return expressions2;
		}
		return null;
	}


}
